home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.6 KB | 137 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWShpLst.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWSHLISH_H
- #define FWSHLISH_H
-
- // ----- Foundation Includes -----
-
- #ifndef FWEXCLIB_H
- #include "FWExcLib.h"
- #endif
-
- // ----- OS Includes
-
- #ifndef FWSHAPE_H
- #include "FWShape.h"
- #endif
-
- #ifndef FWSHPLST_H
- #include "FWShpLst.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef FWODTYPS_H
- #include "FWODTyps.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CGraphicContext;
- class FW_CPoint;
- class FW_CRect;
- class FW_CShape;
-
- //========================================================================================
- // class FW_CShapeListShape
- //========================================================================================
-
- class FW_CShapeListShape : public FW_CShape
- {
-
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(FW_CShapeListShape)
-
- //----------------------------------------------------------------------------------------
- // Constructors/Destructors
- //
- public:
- FW_CShapeListShape(const FW_PShapeList& list);
- FW_CShapeListShape(const FW_CShapeListShape& other);
- FW_CShapeListShape(FW_CReadableStream& stream);
-
- virtual ~FW_CShapeListShape();
-
- //----------------------------------------------------------------------------------------
- // Operators
- //
- public:
- FW_CShapeListShape& operator=(const FW_CShapeListShape& other);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
-
- // ----- Shape list methods
-
- const FW_PShapeList& GetShapeList() const;
- FW_PShapeList& GetShapeList();
-
- FW_PShapeList& GetUnSharedShapeList();
-
- void SetShapeList(const FW_PShapeList& list);
-
- FW_CShape* HitTestList(FW_CGraphicContext& gc,
- const FW_CPoint& test,
- FW_Fixed tolerance) const;
-
- //----------------------------------------------------------------------------------------
- // Shape API
- //
- public:
- // ----- Memory Management
- virtual void Purge();
-
- // ----- Rendering
- virtual void Render(FW_CGraphicContext& gc) const;
- static void RenderShapeList(FW_CGraphicContext& gc,
- const FW_PShapeList& shapeList);
-
- // ----- Copying
- virtual FW_CShape* Copy() const;
- FW_CShapeListShape* DeepCopy() const;
-
- // ----- Hit Testing
- virtual FW_Boolean HitTest(FW_CGraphicContext& gc,
- const FW_CPoint& test,
- FW_Fixed tolerance) const;
- // ----- Transform
- virtual void Transform(Environment *ev, ODTransform* transform);
- virtual void InverseTransform(Environment *ev, ODTransform* transform);
-
- virtual void MoveShape(FW_Fixed deltaX, FW_Fixed deltaY);
- virtual void MoveShapeTo(FW_Fixed x, FW_Fixed y);
-
- virtual void Inset(FW_Fixed h, FW_Fixed v);
-
- // ----- Bounds
- virtual void GetBounds(FW_CGraphicContext& gc, FW_CRect& rect) const;
-
- // ----- Anchor Point -----
- virtual FW_CPoint GetAnchorPoint() const;
-
- // ----- Archiving -----
- virtual void Flatten(FW_CWritableStream& stream) const;
- static void* Read(FW_CReadableStream& stream, FW_ClassTypeConstant type);
-
- //----------------------------------------------------------------------------------------
- // Implementation
- //
-
- private:
- FW_PShapeList fShapeList;
- };
-
-
- #endif // FWSHLISH_H
-